<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Customization</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Icl">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Icl">
<link rel="prev" href="interface/function_synopsis.html" title="Function Synopsis">
<link rel="next" href="implementation.html" title="Implementation">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="interface/function_synopsis.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implementation.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_icl_customization" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_icl.customization"></a><a class="link" href="customization.html" title="Customization">Customization</a>
</h2></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="customization.html#boost_icl.customization.intervals">Intervals</a></span></dt></dl></div>
<div class="section boost_icl_customization_intervals" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_icl.customization.intervals"></a><a class="link" href="customization.html#boost_icl.customization.intervals" title="Intervals">Intervals</a>
</h3></div></div></div>
<p>
        The <span class="bold"><strong>icl</strong></span> provides the possibility of customizing
        user defined interval class templates and class types with static interval
        borders to be used with interval containers.
      </p>
<p>
        There is a template <code class="computeroutput"><a class="link" href="../boost/icl/interval_traits.html" title="Struct template interval_traits">interval_traits</a></code>,
        that has to be instatiated for the user defined interval type, in order to
        provide associated types and basic functions. Bound types of the interval
        are assigned by specializing the template <code class="computeroutput"><span class="identifier">interval_bound_type</span></code>.
      </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
              <p>
                Customize
              </p>
              </th>
<th>
              <p>
                Name
              </p>
              </th>
<th>
              <p>
                Description
              </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
              <p>
                associated types
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">interval_type</span></code>
              </p>
              </td>
<td>
              <p>
                interval type of the partial specialisation for the user defined
                type
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">domain_type</span></code>
              </p>
              </td>
<td>
              <p>
                the domain or element type of the interval
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">domain_compare</span></code>
              </p>
              </td>
<td>
              <p>
                the ordering on the elements
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                basic functions
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">construct</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">domain_type</span><span class="special">&amp;,</span> <span class="keyword">const</span>
                <span class="identifier">domain_type</span><span class="special">&amp;)</span></code>
              </p>
              </td>
<td>
              <p>
                construct an interval
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">lower</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">interval_type</span><span class="special">&amp;)</span></code>
              </p>
              </td>
<td>
              <p>
                select the interval's lower bound
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">upper</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">interval_type</span><span class="special">&amp;)</span></code>
              </p>
              </td>
<td>
              <p>
                select the interval's upper bound
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                interval bounds
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">interval_bound_type</span><span class="special">&lt;</span><span class="identifier">interval_type</span><span class="special">&gt;{...}</span></code>
              </p>
              </td>
<td>
              <p>
                specialize meta function <code class="computeroutput"><span class="identifier">interval_bound_type</span></code>
                to assign one of the 4 bound types to the user defined interval.
              </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        How to do the customization in detail is shown in example <a class="link" href="examples/custom_interval.html" title="Custom interval">custom
        interval</a>.
      </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2007 -2010 Joachim Faulhaber<br>Copyright &#169; 1999 -2006 Cortex Software GmbH<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="interface/function_synopsis.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implementation.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
